<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扩大卡片</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        .app {
            display: flex;

            padding: 30px;
            height: 100vh;
            overflow: hidden;
        }

        .app .card {
            position: relative;
            flex: 0.5;
            margin: 20px;
            height: 90vh;
            width: 90vw;
            color: white;
            text-align: center;
            cursor: pointer;
            border-radius: 20px;
            background-image: url('https://images.unsplash.com/photo-1549880338-65ddcdfd017b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            transition: all 500ms ease-in;
        }

        .app .card h2 {
            position: absolute;
            bottom: 20px;
            left: 20px;
        }

        .app .launch {
            flex: 5;
        }
    </style>
</head>

<body>
    <div class="app">
        <div class="card launch">
            <h2>01</h2>
        </div>

        <div class="card">
            <h2>02</h2>
        </div>

        <div class="card">
            <h2>03</h2>
        </div>

        <div class="card">
            <h2>04</h2>
        </div>

        <div class="card">
            <h2>05</h2>
        </div>

        <div class="card">
            <h2>06</h2>
        </div>

     
    </div>
</body>

<script>
    var cards = document.querySelectorAll(".card")
    cards.forEach(item => {
        item.addEventListener('click',()=> {
            removeClassLaunch(cards)
            item.classList.add('launch')
        })
    })

    function removeClassLaunch(cards){
        cards.forEach(item => {
            item.classList.remove('launch')
        })
    }
</script>

</html>